<%@ page language="java" pageEncoding="gb2312"%>
<%@ page import = "java.util.Random"%>
<html>
<body background='/img/checkcode.gif'><%
		Random random = new Random();
		StringBuilder randomCodeOK = new StringBuilder();
		StringBuilder randomCode = new StringBuilder();
		char[] codeSequence = { '0', '1', '2', '3', '4', '6', '7', '8', '9' }; 
		String[] codeColor = { "red","blue","black","purple","green","#556b2f","#1e90ff"};
		
		for(int i=0;i<4;i++)
		{
			int j=random.nextInt(9);
			char tmp=codeSequence[j];
			randomCodeOK.append("&nbsp;<font color="+codeColor[j%7]);
			randomCodeOK.append(" >");
			randomCodeOK.append(tmp);
			randomCodeOK.append("</font>");
			randomCode.append(tmp);
		}
		session.setAttribute("rand", randomCode.toString());
		codeSequence=null;
		randomCode=null;
		codeColor=null;
		
%><font style='font-family:arial;font-size:18'><%=randomCodeOK %></font><br><br></body>
</html>